/*
 * Cetelem Payment Gateway - Admin Panel Styles
 * Modern, elegant design for WooCommerce settings
 */

/* Container */
.woocommerce table.form-table.apg-table {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-top: 16px;
    border: 1px solid #e5e7eb;
}

/* Header area */
.woocommerce .cabecera {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 12px;
    padding: 48px 32px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(15, 52, 96, 0.15);
    position: relative;
}

.woocommerce .cabecera .imagen {
    max-width: 320px;
    height: auto;
    filter: brightness(1.1);
    transition: transform 0.3s ease;
}

.woocommerce .cabecera .imagen:hover {
    transform: scale(1.03);
}

/* Version badge */
.woocommerce .cabecera .cetelem-version {
    position: absolute;
    bottom: 12px;
    right: 16px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

/* Section heading */
.woocommerce table.form-table.apg-table+h3,
.woocommerce h3 a {
    color: #1a1a2e;
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    letter-spacing: -0.3px;
}

.woocommerce h3 a:hover {
    color: #0f3460;
}

/* Table rows */
.woocommerce table.form-table.apg-table tr {
    border-bottom: 1px solid #f0f0f5;
    transition: background-color 0.2s ease;
}

.woocommerce table.form-table.apg-table tr:last-child {
    border-bottom: none;
}

.woocommerce table.form-table.apg-table tr:hover {
    background-color: #f8f9fc;
}

/* Labels */
.woocommerce table.form-table.apg-table th {
    padding: 20px 16px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    letter-spacing: 0.01em;
    vertical-align: top;
    width: 220px;
}

.woocommerce table.form-table.apg-table th label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Field cells */
.woocommerce table.form-table.apg-table td {
    padding: 16px;
    vertical-align: middle;
}

/* Text inputs */
.woocommerce table.form-table.apg-table input[type="text"],
.woocommerce table.form-table.apg-table input[type="number"],
.woocommerce table.form-table.apg-table input[type="url"],
.woocommerce table.form-table.apg-table input[type="email"] {
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #1f2937;
    background: #fafbfc;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 600px;
}

.woocommerce table.form-table.apg-table input[type="text"]:focus,
.woocommerce table.form-table.apg-table input[type="number"]:focus,
.woocommerce table.form-table.apg-table input[type="url"]:focus,
.woocommerce table.form-table.apg-table input[type="email"]:focus {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
    background: #fff;
    outline: none;
}

/* Textareas */
.woocommerce table.form-table.apg-table textarea {
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    color: #1f2937;
    background: #fafbfc;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    min-height: 100px;
    width: 100%;
    max-width: 600px;
    resize: vertical;
}

.woocommerce table.form-table.apg-table textarea:focus {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
    background: #fff;
    outline: none;
}

/* Select dropdowns */
.woocommerce table.form-table.apg-table select {
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #1f2937;
    background: #fafbfc;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    min-width: 300px;
    width: 100%;
    max-width: 600px;
    cursor: pointer;
}

.woocommerce table.form-table.apg-table select:focus {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
    background: #fff;
    outline: none;
}

/* Checkboxes */
.woocommerce table.form-table.apg-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #0f3460;
    transition: all 0.2s ease;
}

.woocommerce table.form-table.apg-table input[type="checkbox"]:checked {
    background-color: #0f3460;
    border-color: #0f3460;
}

/* Color picker */
.woocommerce table.form-table.apg-table input[type="color"] {
    width: 48px;
    height: 48px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.woocommerce table.form-table.apg-table input[type="color"]:hover {
    border-color: #0f3460;
    box-shadow: 0 2px 8px rgba(15, 52, 96, 0.15);
    transform: scale(1.05);
}

/* Description tips */
.woocommerce table.form-table.apg-table .description {
    color: #6b7280;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.5;
    font-style: normal;
}

/* WooCommerce enhanced select */
.woocommerce table.form-table.apg-table .select2-container .select2-selection--single {
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    height: 42px;
    padding: 6px 8px;
    background: #fafbfc;
    transition: all 0.25s ease;
}

.woocommerce table.form-table.apg-table .select2-container--open .select2-selection--single {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
}

.woocommerce table.form-table.apg-table .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: #1f2937;
    font-size: 14px;
}

/* Multiselect */
.woocommerce table.form-table.apg-table .select2-container .select2-selection--multiple {
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fafbfc;
    min-height: 42px;
    padding: 4px 8px;
}

.woocommerce table.form-table.apg-table .select2-container .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
}

/* Save button */
.woocommerce table.form-table.apg-table+p .woocommerce-save-button,
.woocommerce .submit .button-primary,
p.submit .woocommerce-save-button {
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 32px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 14px rgba(15, 52, 96, 0.25) !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
}

.woocommerce table.form-table.apg-table+p .woocommerce-save-button:hover,
.woocommerce .submit .button-primary:hover,
p.submit .woocommerce-save-button:hover {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%) !important;
    box-shadow: 0 6px 20px rgba(15, 52, 96, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* Tooltip icon styling */
.woocommerce table.form-table.apg-table .woocommerce-help-tip {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.woocommerce table.form-table.apg-table .woocommerce-help-tip:hover {
    color: #0f3460;
}

/* Section dividers for form groups */
.woocommerce table.form-table.apg-table tr:nth-child(6) td,
.woocommerce table.form-table.apg-table tr:nth-child(6) th {
    border-top: 2px solid #e5e7eb;
    padding-top: 24px;
}

/* Responsive */
@media (max-width: 782px) {
    .woocommerce table.form-table.apg-table {
        padding: 16px;
    }

    .woocommerce table.form-table.apg-table th {
        width: 100%;
        display: block;
        padding-bottom: 4px;
    }

    .woocommerce table.form-table.apg-table td {
        display: block;
        padding-top: 4px;
    }

    .woocommerce table.form-table.apg-table input[type="text"],
    .woocommerce table.form-table.apg-table input[type="number"],
    .woocommerce table.form-table.apg-table textarea,
    .woocommerce table.form-table.apg-table select {
        max-width: 100%;
    }
}