/* License Management Styles - Matching existing Blogibot design patterns */

/* License Information Note Block */
.blog82ai-license-info-note {
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f9ff 100%);
    border: 2px solid #2196f3;
    border-left: 5px solid #2196f3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.blog82ai-note-icon {
    flex-shrink: 0;
}

.blog82ai-note-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #2196f3;
}

.blog82ai-note-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1565c0;
}

.blog82ai-note-content p {
    margin: 0 0 12px 0;
    color: #37474f;
    font-size: 14px;
    line-height: 1.5;
}

.blog82ai-note-content .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.blog82ai-note-content .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Main container styling - matches generate-new-blog pattern */
.blog82ai-license-management {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Page header styling - matches existing pattern */
.blog82ai-license-management .blog82ai-page-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 15px;
}

.blog82ai-license-management .blog82ai-page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #23282d;
}

.blog82ai-license-management .blog82ai-page-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

/* Form sections - matches existing pattern */
.blog82ai-license-management .blog82ai-form-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.blog82ai-license-management .blog82ai-form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #23282d;
}

.blog82ai-license-management .blog82ai-form-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #23282d;
}

/* Form rows and groups - matches existing pattern */
.blog82ai-license-management .blog82ai-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog82ai-license-management .blog82ai-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    min-width: 250px;
}

.blog82ai-license-management .blog82ai-form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #23282d;
}

.blog82ai-license-management input[type="text"],
.blog82ai-license-management select,
.blog82ai-license-management textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
    color: #23282d;
    margin-top: 4px;
    box-sizing: border-box;
}

.blog82ai-license-management input[readonly] {
    background-color: #f1f1f1;
    color: #666;
}

.blog82ai-license-management small {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

/* Form actions - matches existing pattern */
.blog82ai-license-management .blog82ai-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
}

.blog82ai-license-management .blog82ai-form-actions .button {
    padding: 8px 16px;
    font-size: 14px;
}

/* License status header */
.blog82ai-license-management .blog82ai-license-status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.blog82ai-license-management .blog82ai-license-status-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.blog82ai-license-icon-success {
    color: #46b450;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.blog82ai-license-icon-warning {
    color: #ffb900;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* License active section */
.blog82ai-license-active-section {
    border-color: #46b450 !important;
    background: linear-gradient(135deg, #f0f9f0 0%, #ffffff 100%);
}

/* License description */
.blog82ai-license-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Features grid - matches dashboard card pattern */
.blog82ai-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.blog82ai-feature-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.blog82ai-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #0073aa;
}

.blog82ai-feature-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    margin: 0 auto 12px;
    color: #0073aa;
}

.blog82ai-feature-card h4 {
    margin: 10px 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.blog82ai-feature-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
    .blog82ai-license-management .blog82ai-form-row {
        flex-direction: column;
    }
    
    .blog82ai-license-management .blog82ai-form-group {
        min-width: 0;
    }
    
    .blog82ai-features-grid {
        grid-template-columns: 1fr;
    }
    
    .blog82ai-license-management .blog82ai-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog82ai-license-management .blog82ai-form-actions .button {
        width: 100%;
        justify-content: center;
    }
    
    /* Responsive note block */
    .blog82ai-license-info-note {
        flex-direction: column;
        padding: 16px;
    }
    
    .blog82ai-note-content .button {
        width: 100%;
        justify-content: center;
    }
}

/* Loading states */
.button.loading {
    position: relative;
    color: transparent !important;
}

.button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* WordPress Admin Layout Fixes */
/* Ensure proper layout and footer positioning */
.blog82ai-wrap {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 200px); /* Ensure minimum height */
    display: flex;
    flex-direction: column;
}

/* Ensure WordPress admin footer stays at bottom */
#wpbody-content {
    padding-bottom: 65px; /* Space for admin footer */
    min-height: calc(100vh - 160px);
}

/* Fix for WordPress admin footer positioning */
#wpfooter {
    position: relative !important;
    bottom: auto !important;
    clear: both;
    margin-top: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure content doesn't overlap with footer */
.blog82ai-license-management {
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    flex: 1;
}

/* Smooth transitions for UI updates */
.blog82ai-license-active,
.blog82ai-license-inactive {
    transition: opacity 0.3s ease-in-out;
}

.blog82ai-license-active.fade-out,
.blog82ai-license-inactive.fade-out {
    opacity: 0;
}

.blog82ai-license-active.fade-in,
.blog82ai-license-inactive.fade-in {
    opacity: 1;
}

/* Form transitions */
#modify-license-form {
    transition: all 0.3s ease-in-out;
    transform-origin: top;
}

#modify-license-form.slide-down {
    animation: slideDown 0.3s ease-out;
}

#modify-license-form.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Fix admin layout */
.wrap {
    position: relative;
}

/* Ensure proper admin page layout */
body.wp-admin {
    min-height: 100vh;
}

#wpcontent {
    min-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

#wpbody {
    flex: 1;
    display: flex;
    flex-direction: column;
}
