/* =================================================================
   SETTINGS PAGE - SIDEBAR + CONTENT LAYOUT
   ================================================================= */

.ggmc-settings-wrap {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 15px;
    min-height: 600px;
}

/* Sidebar Navigation */
.ggmc-settings-sidebar {
    width: 200px;
    min-width: 200px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px 0;
    position: sticky;
    top: 48px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

.ggmc-settings-nav-group {
    padding: 0;
    margin-bottom: 4px;
}

.ggmc-settings-nav-group:last-child {
    margin-bottom: 0;
}

.ggmc-settings-nav-group h3 {
    margin: 0;
    padding: 8px 16px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8c8f94;
}

.ggmc-settings-nav-item {
    display: block;
    padding: 7px 16px;
    font-size: 13px;
    color: #2c3338;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.ggmc-settings-nav-item:hover {
    background: #f0f0f1;
    color: var(--ggmc-primary, #0F766E);
    text-decoration: none;
}

.ggmc-settings-nav-item:focus {
    box-shadow: none;
    outline: none;
}

.ggmc-settings-nav-item.active {
    background: var(--ggmc-primary-light, #e6f4f3);
    color: var(--ggmc-primary, #0F766E);
    font-weight: 600;
    border-left-color: var(--ggmc-primary, #0F766E);
}

/* Content Area */
.ggmc-settings-content {
    flex: 1;
    min-width: 0;
}

.ggmc-settings-content .card:first-child,
.ggmc-settings-main .card:first-child,
.ggmc-settings-grid .card {
    margin-top: 0;
}

.ggmc-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* =================================================================
   TAB CONTENT - HELP SIDEBAR LAYOUT
   ================================================================= */

.ggmc-settings-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.ggmc-settings-main {
    min-width: 0;
}

/* Help Sidebar */
.ggmc-settings-help {
    position: sticky;
    top: 50px;
    margin-top: 0;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

.ggmc-settings-help h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dcdcde;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ggmc-settings-help h3 .dashicons {
    color: var(--ggmc-primary, #0F766E);
}

.ggmc-settings-help h4 {
    margin: 15px 0 8px;
    font-size: 13px;
}

.ggmc-settings-help p {
    font-size: 13px;
    line-height: 1.5;
}

.ggmc-settings-help ul,
.ggmc-settings-help ol {
    margin: 10px 0 10px 20px;
    font-size: 13px;
}

.ggmc-settings-help li {
    margin-bottom: 5px;
}

.ggmc-settings-help code {
    background: #f0f0f1;
    padding: 2px 5px;
    font-size: 12px;
}

.ggmc-settings-help a {
    text-decoration: none;
}

.ggmc-settings-help a:hover {
    text-decoration: underline;
}

.ggmc-settings-help .ggmc-help-table {
    margin-top: 10px;
    background: #f6f7f7;
    border-radius: 4px;
    padding: 10px;
}

.ggmc-settings-help .ggmc-help-table table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.ggmc-settings-help .ggmc-help-table td {
    padding: 4px 0;
}

.ggmc-settings-help .ggmc-help-tip {
    margin-top: 15px;
    padding: 10px 12px;
    background: #fff8e5;
    border-left: 3px solid #dba617;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
}

.ggmc-settings-help .ggmc-help-tip .dashicons {
    color: #dba617;
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.ggmc-settings-help .ggmc-help-warning {
    margin-top: 15px;
    padding: 10px 12px;
    background: #fcf0f1;
    border-left: 3px solid #d63638;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
}

.ggmc-settings-help .ggmc-help-warning .dashicons {
    color: #d63638;
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.ggmc-settings-help .ggmc-help-links {
    margin-top: 15px;
    padding: 12px;
    background: #f6f7f7;
    border-radius: 4px;
}

.ggmc-settings-help .ggmc-help-links h4 {
    margin: 0 0 8px !important;
}

.ggmc-settings-help .ggmc-help-links ul {
    margin: 0;
    list-style: none;
}

.ggmc-settings-help .ggmc-help-links .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Wider cards for settings tabs */
.ggmc-settings-content .card,
.ggmc-settings-main .card,
.ggmc-payment-settings .card {
    max-width: 620px;
}

.ggmc-settings-content .card .form-table th,
.ggmc-settings-main .card .form-table th,
.ggmc-payment-settings .card .form-table th {
    width: 180px;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */

@media (max-width: 1200px) {
    .ggmc-settings-layout {
        grid-template-columns: 1fr;
    }

    .ggmc-settings-help {
        display: none;
    }
}

@media (max-width: 782px) {
    .ggmc-settings-wrap {
        flex-direction: column;
    }

    .ggmc-settings-sidebar {
        width: 100%;
        min-width: 0;
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        padding: 8px;
        border-radius: 4px;
    }

    .ggmc-settings-nav-group {
        margin-bottom: 0;
    }

    .ggmc-settings-nav-group h3 {
        display: none;
    }

    .ggmc-settings-nav-item {
        padding: 6px 12px;
        border-left: none;
        border-bottom: 2px solid transparent;
        font-size: 12px;
        white-space: nowrap;
    }

    .ggmc-settings-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--ggmc-primary, #0F766E);
    }

    .ggmc-settings-content {
        padding: 0;
    }
}
