/**
 * PopCash Code Integration Tool - Modern WordPress Admin Styles
 * No Bootstrap - Pure WordPress UI
 *
 * @package PopCash_Code_Integration
 * @since 1.9
 */

/* Main Container */
.pcit-wrap {
    max-width: 1200px;
    margin: 20px 0;
}

/* Header Section */
.pcit-header {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 20px;
    text-align: center;
}

.pcit-header h1 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
}

.pcit-logo {
    max-width: 300px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

/* Status Toggle (Legacy - kept for compatibility) */
.pcit-status-toggle {
    margin: 20px 0;
}

.pcit-status-toggle .button {
    min-width: 200px;
    font-size: 14px;
}

/* Alert Messages */
.pcit-alert {
    background: #fff;
    border-left: 4px solid #72aee6;
    padding: 12px 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.pcit-alert.error {
    border-left-color: #d63638;
    background: #fcf0f1;
}

.pcit-alert.success {
    border-left-color: #00a32a;
    background: #f0f6fc;
}

.pcit-alert.warning {
    border-left-color: #dba617;
    background: #fcf9e8;
}

.pcit-alert p {
    margin: 0.5em 0;
}

/* Tab Navigation Wrapper */
.pcit-tabs-wrapper {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 20px;
}

/* Tab Navigation */
.pcit-tabs {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
}

.pcit-tabs li {
    margin: 0;
    padding: 0;
}

.pcit-tabs a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #50575e;
    font-weight: 500;
    border-right: 1px solid #c3c4c7;
    transition: all 0.2s;
    position: relative;
}

.pcit-tabs a:hover {
    background: #f6f7f7;
    color: #2271b1;
}

.pcit-tabs a.active {
    background: #f6f7f7;
    color: #2271b1;
}

.pcit-tabs a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2271b1;
}

.pcit-tabs a.active strong {
    color: #2271b1;
}

/* Toggle Button in Tabs Area */
.pcit-tabs-toggle {
    margin-left: auto;
    padding: 10px 0;
}

.pcit-tabs-toggle .button {
    white-space: nowrap;
}

/* Form Container */
.pcit-form-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 30px;
}

/* Form Rows */
.pcit-form-row {
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.pcit-form-row:last-child {
    margin-bottom: 0;
}

.pcit-form-label {
    flex: 0 0 200px;
    padding-top: 8px;
}

.pcit-form-label label {
    font-weight: 600;
    color: #1d2327;
    display: block;
}

.pcit-form-field {
    flex: 1;
    max-width: 600px;
}

.pcit-form-field input[type="text"],
.pcit-form-field input[type="number"],
.pcit-form-field select {
    width: 100%;
    max-width: 400px;
}

.pcit-form-field .description {
    margin-top: 8px;
    font-size: 13px;
    color: #646970;
    font-style: italic;
}

/* Radio Group */
.pcit-radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.pcit-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.pcit-radio-group input[type="radio"] {
    margin: 0;
}

/* Submit Section */
.pcit-submit-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #c3c4c7;
    text-align: left;
}

.pcit-submit-section .button-primary {
    min-width: 150px;
    font-size: 14px;
}

/* Info Box */
.pcit-info-box {
    background: #f0f6fc;
    border: 1px solid #72aee6;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.pcit-info-box h4 {
    margin: 0 0 10px 0;
    color: #2c3338;
    font-size: 14px;
}

.pcit-info-box p {
    margin: 0;
    font-size: 13px;
    color: #50575e;
}

.pcit-info-box ul {
    margin: 10px 0 0 20px;
    font-size: 13px;
}

/* Badge */
.pcit-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.pcit-badge.active {
    background: #00a32a;
    color: #fff;
}

.pcit-badge.inactive {
    background: #dcdcde;
    color: #50575e;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .pcit-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .pcit-form-label {
        flex: none;
        padding-top: 0;
    }
    
    .pcit-form-field {
        max-width: none;
    }
    
    .pcit-tabs-wrapper {
        flex-direction: column;
        padding-right: 0;
    }
    
    .pcit-tabs {
        flex-direction: column;
        width: 100%;
    }
    
    .pcit-tabs a {
        border-right: none;
        border-bottom: 1px solid #c3c4c7;
    }
    
    .pcit-tabs-toggle {
        width: 100%;
        padding: 15px;
        border-top: 1px solid #c3c4c7;
        text-align: center;
    }
    
    .pcit-tabs-toggle .button {
        width: 100%;
    }
    
    .pcit-radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Loading State */
.pcit-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pcit-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2271b1;
    border-radius: 50%;
    border-top-color: transparent;
    animation: pcit-spin 0.6s linear infinite;
}

@keyframes pcit-spin {
    to { transform: rotate(360deg); }
}

/* Settings Saved Notice */
.pcit-settings-saved {
    background: #00a32a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pcit-settings-saved .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* WordPress Admin Menu Icon */
#adminmenu #toplevel_page_popcash-net .wp-menu-image img {
    width: 20px;
    height: 20px;
    padding: 6px 0;
    opacity: 0.6;
}

#adminmenu #toplevel_page_popcash-net:hover .wp-menu-image img,
#adminmenu #toplevel_page_popcash-net.current .wp-menu-image img {
    opacity: 1;
}
