/**
 * Cielo Modern Layout Styles
 * 
 * Modern, clean styling for credit card payment forms with:
 * - Gradient backgrounds and smooth transitions
 * - Card brand detection visual feedback
 * - Field icons and focus effects
 * - Responsive design
 * - Custom submit button
 * 
 * @package Lkn\WCCieloPaymentGateway
 * @since 1.0.0
 * @author Link Nacional
 * 
 * Used by: lkn-cielo-credit-payment-fields-modern-layout.php
 * JS Support: lkn-cielo-brand-detector.js
 */

/* === MODERN LAYOUT CONTAINER === */
.lkn-modern-layout {
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
}

/* === CARD BRANDS SECTION === */
.cielo-card-brands-container {
    text-align: center;
    margin: 20px 0 25px 0;
    padding: 15px 0;
}

.cielo-card-brands {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(233, 236, 239, 0.6);
}

.card-brand-icon {
    width: 40px;
    height: auto;
    transition: all 0.3s ease;
    border-radius: 4px;
    filter: grayscale(30%) opacity(0.8);
    display: inline-block;
}

.card-brand-icon:not([src]), 
.card-brand-icon[src=""] {
    display: none;
}

/* === FORM FIELDS === */
.modern-form-fields {
    overflow: hidden;
}

.modern-field {
    margin-bottom: 20px;
    position: relative;
}

.modern-field input {
    margin: 0px !important;
}

.field-group {
    display: flex;
    flex-wrap: wrap;
    column-gap: 16px;
}

.field-half {
    flex: 1;
    width: 100%;
    min-width: 200px;
}

/* === LABELS === */
.field-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: #dc3545;
    margin-left: 3px;
}

/* === INPUT & SELECT STYLES === */
.field-input, 
.field-select {
    width: 100% !important;
    border: 2px solid #e9ecef !important;
    padding: .5em .8em !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit;
    background-color: #ffffff;
    color: #495057;
    transition: all 0.3s ease;
    vertical-align: middle;
    outline: none;
}

.field-input::placeholder, 
.field-select::placeholder {
    font-size: 1rem !important;
    vertical-align: middle !important;
}

.field-input:focus, 
.field-select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.field-input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* === SELECT SPECIFIC STYLES === */
.field-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.field-select option[value="loading"] {
    font-style: italic;
    color: #6c757d;
}

/* === FIELD WRAPPERS === */
.field-wrapper {
    display: flex;
    position: relative;
}

/* === FIELD ICONS === */
.field-icon {
    display: flex;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    pointer-events: none;
}

.field-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    margin: 0px !important;
}

/* === FOCUS EFFECTS === */
.modern-field.focused .field-label {
    color: #007cba;
    transition: color 0.2s ease;
}

.modern-field.focused .field-icon {
    opacity: 1;
}

.modern-field.focused .field-icon img {
    filter: grayscale(0%) brightness(1.2);
}

/* === SUBMIT SECTION === */
.payment-submit-section {
    margin-top: 24px;
    text-align: center;
}

.cielo-submit-button {
    background-color: #306FC5 !important;
    color: #fff !important;
    width: 100% !important;
    border: none !important;
    transition: background-color 0.3s ease-in-out !important;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cielo-submit-button:hover {
    background-color: #2557a3 !important;
}

.cielo-submit-button:active {
    transform: translateY(0);
}

.cielo-submit-button:disabled {
    background-color: #6c757d !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.submit-description {
    margin-top: 12px;
    margin-bottom: 0;
    color: #8e9ba8;
    font-size: 13px;
    font-style: italic;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .lkn-modern-layout {
        padding: 16px;
    }
    
    .field-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .cielo-card-brands {
        gap: 8px;
        padding: 8px 15px;
    }
    
    .card-brand-icon {
        width: 32px !important;
    }
    
    .cielo-card-brands-container {
        margin: 15px 0 20px 0;
    }
    
    .field-icon {
        right: 10px;
    }
    
    .cielo-submit-button {
        padding: 16px 20px !important;
        font-size: 15px !important;
    }
    
    .submit-description {
        font-size: 12px !important;
    }
}