/* Autuskey WooCommerce Jewelry Manager - Admin Styles */

/* Jewelry Tabs Styles */
.jewelry-tabs-wrapper {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.jewelry-tabs-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
}

.jewelry-tabs-nav li {
    margin: 0;
    padding: 0;
}

.jewelry-tabs-nav .jewelry-tab-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-right: 1px solid #ddd;
    transition: all 0.2s ease;
    font-weight: 600;
    position: relative;
}

.jewelry-tabs-nav .jewelry-tab-link:hover {
    background: #e9e9e9;
    color: #333;
}

.jewelry-tabs-nav .jewelry-tab-link.active {
    background: #fff;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    margin-bottom: -1px;
}

.jewelry-tabs-nav li:last-child .jewelry-tab-link {
    border-right: none;
}

.jewelry-tabs-content {
    position: relative;
    min-height: 200px;
}

.jewelry-tab-panel {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

.jewelry-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive tabs for smaller screens */
@media (max-width: 768px) {
    .jewelry-tabs-nav {
        flex-direction: column;
    }
    
    .jewelry-tabs-nav .jewelry-tab-link {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .jewelry-tabs-nav li:last-child .jewelry-tab-link {
        border-bottom: none;
    }
    
    .jewelry-tabs-nav .jewelry-tab-link.active {
        border-bottom: none;
        border-left: 3px solid #0073aa;
        margin-bottom: 0;
        margin-left: -1px;
    }
}

/* Field styling within tabs */
.jewelry-tab-panel .options_group {
    border: none;
    margin: 0;
    padding: 0;
}

.jewelry-tab-panel .form-field {
    margin-bottom: 15px;
}

/* Certificate upload styling */
#certificate_filename {
    display: block;
    margin-top: 8px;
    font-style: italic;
    color: #666;
}

#certificate_filename strong {
    color: #333;
    font-style: normal;
}

#remove_certificate {
    color: #a00;
    text-decoration: none;
    margin-left: 10px;
}

#remove_certificate:hover {
    color: #dc3232;
    text-decoration: underline;
}

/* Tab indicator for required fields */
.jewelry-tab-link.has-error::after {
    content: "!";
    background: #dc3232;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 8px;
}

/* Smooth transitions */
.jewelry-tabs-wrapper * {
    box-sizing: border-box;
}

/* Loading state */
.jewelry-tabs-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.jewelry-tabs-wrapper.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus and accessibility styles */
.jewelry-tab-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
    box-shadow: none;
}

.jewelry-tab-link:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .jewelry-tabs-nav .jewelry-tab-link {
        border-color: #000;
    }
    
    .jewelry-tabs-nav .jewelry-tab-link.active {
        background: #000;
        color: #fff;
        border-bottom-color: #000;
    }
    
    .jewelry-tab-link.has-error::after {
        background: #fff;
        color: #000;
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .jewelry-tab-panel {
        animation: none;
    }
    
    .jewelry-tabs-wrapper.loading::after {
        animation: none;
    }
    
    .jewelry-tab-link {
        transition: none;
    }
}

/* Print styles */
@media print {
    .jewelry-tabs-nav {
        display: none;
    }
    
    .jewelry-tab-panel {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .jewelry-tab-panel::before {
        content: attr(data-tab-title);
        font-weight: bold;
        font-size: 16px;
        display: block;
        margin-bottom: 10px;
        border-bottom: 1px solid #000;
        padding-bottom: 5px;
    }
}
