/* AI Try-On Assistant - Admin Styles */

/* Settings page styles */
.aitoa-settings-section,
.aitoa-api-status,
.aitoa-help-section {
    margin: 30px 0;
    background: white;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.aitoa-settings-section h2,
.aitoa-api-status h2,
.aitoa-help-section h2 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.aitoa-api-status .notice {
    margin: 15px 0;
}

.aitoa-help-section p {
    margin-bottom: 15px;
}

.aitoa-help-section a.button {
    text-decoration: none;
}

/* Product Meta Box styles */
.aitoa-product-settings {
    padding: 10px 0;
}

.aitoa-product-settings p {
    margin: 15px 0;
}

.aitoa-product-settings label {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 5px;
}

.aitoa-product-settings select {
    width: 100%;
    max-width: 200px;
}

.aitoa-image-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    max-width: 100%;
}

.aitoa-image-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9f9f9;
}

.aitoa-image-option:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.aitoa-image-option input[type="checkbox"] {
    margin: 0;
}

.aitoa-image-option input[type="checkbox"]:checked + img {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.aitoa-image-option img {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Settings form styles */
.aitoa-settings-form table {
    background: white;
}

.aitoa-settings-form th {
    padding: 20px 10px;
    font-weight: 600;
    color: #23282d;
}

.aitoa-settings-form td {
    padding: 15px 10px;
}

.aitoa-settings-form input[type="password"],
.aitoa-settings-form input[type="text"] {
    width: 350px;
    max-width: 100%;
}

.aitoa-settings-form .description {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Checkbox styles */
.aitoa-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aitoa-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.aitoa-checkbox-group input[type="checkbox"] {
    margin: 0;
}

/* Status indicator */
.aitoa-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

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

.aitoa-status-indicator.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #faeeba;
}

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

/* Tooltip */
.aitoa-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.aitoa-tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.aitoa-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Responsive design */
@media (max-width: 782px) {
    .aitoa-image-selection {
        justify-content: center;
    }
    
    .aitoa-image-option img {
        width: 50px;
        height: 50px;
    }
    
    .aitoa-settings-form input[type="password"],
    .aitoa-settings-form input[type="text"] {
        width: 100%;
    }
}

/* WordPress Admin compatibility adjustments */
.wrap .aitoa-settings-section {
    margin-left: 0;
    margin-right: 0;
}

#aitoa_try_on_settings {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Button styles */
.aitoa-admin-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    line-height: 1.4;
    transition: background-color 0.2s ease;
}

.aitoa-admin-button:hover {
    background: #005a87;
    color: white;
}

.aitoa-admin-button.secondary {
    background: #666;
}

.aitoa-admin-button.secondary:hover {
    background: #555;
}

/* Error and success message styles */
.aitoa-admin-notice {
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.aitoa-admin-notice.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.aitoa-admin-notice.error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.aitoa-admin-notice.warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.aitoa-admin-notice.info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Admin meta box additional styles */
.aitoa-meta-box label {
    font-weight: 600;
}
.aitoa-image-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.aitoa-image-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 3px;
}
.aitoa-image-item input {
    margin-right: 8px;
}
.aitoa-no-images {
    color: #666;
    font-style: italic;
    padding: 10px;
    text-align: center;
    border: 1px dashed #ddd;
    border-radius: 4px;
}
.aitoa-quick-save-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}
#aitoa-quick-save {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
#aitoa-quick-save .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

/* Info card styles for settings page */
.aitoa-info-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.aitoa-info-card h4 {
    margin-top: 0;
    color: #1d2327;
}
.aitoa-info-card p {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Settings page specific styles */
.vtoa-info-card {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.vtoa-info-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1d2327;
    font-size: 14px;
    font-weight: 600;
}

.vtoa-info-card p {
    margin: 0;
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
}

/* Product meta box styles */
.vtoa-image-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.vtoa-image-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.vtoa-image-option input[type="checkbox"] {
    margin: 0;
}

.vtoa-image-option:hover {
    border-color: #007cba;
}

.vtoa-image-option input[type="checkbox"]:checked + img {
    outline: 3px solid #007cba;
}