/**
 * 产品作者设置样式
 */

.loveful-product-author-settings {
 
    margin: 20px 0;
    max-width: 600px;
}

.author-settings-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.author-settings-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 新的行布局 */
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.permission-toggles {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1;
}

.permission-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    flex-shrink: 0;
}

.permission-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.permission-checkbox:checked + .toggle-slider {
    background-color: #00c143;
}

.permission-checkbox:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.permission-checkbox:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-info {
    flex: 1;
}

.toggle-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.settings-status {
    margin-top: 15px;
}

.status-message {
    padding: 10px 15px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
    font-weight: 500;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 删除按钮样式 */
.author-settings-actions {
    flex-shrink: 0;
}

.loveful-delete-product-btn {
    background: none;
    color: #dc3545;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.loveful-delete-product-btn:hover {
    background: none;
    color: #c82333;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

.loveful-delete-product-btn:active {
    transform: none;
}

.loveful-delete-product-btn:disabled {
    background: none;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.loveful-delete-product-btn:disabled:hover {
    background: none;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* 禁用按钮样式 */
.single_add_to_cart_button.disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.single_add_to_cart_button.disabled:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

/* 禁用设计按钮样式 */
.loveful-start-design-link.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.loveful-start-design-link.disabled .text-button {
    color: #6c757d !important;
}

.loveful-start-design-link.disabled .subtitle {
    color: #6c757d !important;
}

.loveful-start-design-link.disabled:hover {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .loveful-product-author-settings {
        margin: 20px 0;
    }
    
    .settings-row {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    
    .permission-toggles {
        flex-direction: row;
        gap: 20px;
    }
    
    .permission-toggle {
        justify-content: flex-start;
        align-items: center;
    }
    
    .author-settings-actions {
        align-self: auto;
    }
    
    .loveful-delete-product-btn {
        width: auto;
        justify-content: flex-start;
        padding: 0;
    }
    
    .toggle-label {
        width: 36px;
        height: 18px;
        display: flex;
        align-items: center;
    }
    
    .toggle-slider {
        border-radius: 18px;
    }
    
    .toggle-slider:before {
        height: 12px;
        width: 12px;
    }
    
    .permission-checkbox:checked + .toggle-slider:before {
        transform: translateX(18px);
    }
    
    .toggle-title {
        font-size: 12px;
        line-height: 1.2;
        display: flex;
        align-items: center;
    }
}