/**
 * ConvMaster - IBAN Validator Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.tool-header__icon .icon--green {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   CURRENT DATE DISPLAY
   ===================================================== */
.iban-current-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.iban-current-date__icon {
    font-size: 1.1rem;
}

.iban-current-date__text {
    font-weight: 500;
    color: var(--text-primary);
}

/* =====================================================
   FORMAT BADGES
   ===================================================== */
.format-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.format-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
}

.format-badge--iban {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.format-badge--bic {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.format-badge--sepa {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

/* =====================================================
   IBAN VALIDATOR WIDGET
   ===================================================== */
.iban-validator {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Input Section */
.iban-validator__input {
    margin-bottom: 1.5rem;
}

.iban-validator__input label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.iban-validator__input-row {
    display: flex;
    gap: 0.75rem;
}

.iban-validator__field {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
}

.iban-validator__field:focus {
    outline: none;
    border-color: #22c55e;
}

.iban-validator__field::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
    text-transform: none;
    letter-spacing: normal;
}

.iban-validator__hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Message Area */
.iban-validator__message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.iban-validator__message[hidden] {
    display: none !important;
}

.iban-validator__message--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.iban-validator__message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.iban-validator__message-icon {
    font-size: 1.25rem;
}

/* Results Section */
.iban-validator__results {
    margin-bottom: 1.5rem;
}

.iban-validator__results[hidden] {
    display: none !important;
}

/* Validation Result Card */
.iban-result {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.iban-result--valid {
    border: 2px solid rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.iban-result--invalid {
    border: 2px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.iban-result__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.iban-result__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.25rem;
}

.iban-result--valid .iban-result__icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.iban-result--invalid .iban-result__icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.iban-result__status {
    font-size: 1.25rem;
    font-weight: 700;
}

.iban-result--valid .iban-result__status {
    color: #22c55e;
}

.iban-result--invalid .iban-result__status {
    color: #ef4444;
}

.iban-result__formatted {
    font-size: 1.35rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    word-break: break-all;
}

/* Details Grid */
.iban-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.iban-details__card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.iban-details__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.iban-details__content {
    flex: 1;
    min-width: 0;
}

.iban-details__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.iban-details__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    word-break: break-all;
}

.iban-details__flag {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.iban-details__flag[hidden] {
    display: none !important;
}

/* BIC Section */
.iban-bic {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.iban-bic[hidden] {
    display: none !important;
}

.iban-bic__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.iban-bic__icon {
    font-size: 1.25rem;
}

.iban-bic__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3b82f6;
}

.iban-bic__content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.iban-bic__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.iban-bic__label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.iban-bic__value {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
}

/* Examples Section */
.iban-validator__examples {
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.iban-examples__header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.iban-examples__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.iban-example-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.iban-example-btn:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.iban-example-btn__flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

/* Actions */
.iban-validator__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Privacy Notice */
.iban-validator__privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.iban-validator__privacy svg {
    color: #22c55e;
}

/* =====================================================
   COUNTRY FORMATS REFERENCE
   ===================================================== */
.iban-formats {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.iban-formats h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.iban-formats__search {
    margin-bottom: 1rem;
}

.iban-formats__search input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
}

.iban-formats__search input:focus {
    outline: none;
    border-color: #22c55e;
}

.iban-formats__search input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.iban-formats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.iban-format-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.iban-format-card:hover {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.3);
}

.iban-format-card[hidden] {
    display: none !important;
}

.iban-format-card__flag {
    width: 28px;
    height: 21px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

.iban-format-card__info {
    flex: 1;
    min-width: 0;
}

.iban-format-card__country {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.iban-format-card__code {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.iban-format-card__length {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.iban-format-card__sepa {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn--primary {
    background: #22c55e;
    color: white;
}

.btn--primary:hover {
    background: #16a34a;
}

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn--outline:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn--sm svg {
    width: 16px;
    height: 16px;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #22c55e;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.5rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =====================================================
   HIDDEN ELEMENTS
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .tool-page {
        padding: 1rem;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .iban-validator {
        padding: 1.5rem;
    }
    
    .iban-validator__input-row {
        flex-direction: column;
    }
    
    .iban-validator__field {
        font-size: 1rem;
    }
    
    .iban-result__formatted {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .iban-details {
        grid-template-columns: 1fr;
    }
    
    .iban-formats {
        padding: 1.5rem;
    }
    
    .iban-formats__grid {
        grid-template-columns: 1fr;
    }
    
    .format-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .iban-validator__field {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
    }
    
    .iban-result__formatted {
        font-size: 0.85rem;
    }
    
    .iban-example-btn {
        flex: 1;
        justify-content: center;
    }
}

/* =====================================================
   LIGHT THEME ADJUSTMENTS
   ===================================================== */
[data-theme="light"] .iban-validator__field {
    background: white;
}

[data-theme="light"] .iban-validator {
    background: white;
}

[data-theme="light"] .iban-result {
    background: var(--bg-secondary);
}

[data-theme="light"] .iban-result__formatted {
    background: white;
}

[data-theme="light"] .iban-details__card {
    background: var(--bg-secondary);
}

[data-theme="light"] .iban-validator__examples {
    background: var(--bg-secondary);
}

[data-theme="light"] .iban-example-btn {
    background: white;
}

[data-theme="light"] .iban-formats {
    background: white;
}

[data-theme="light"] .iban-formats__search input {
    background: var(--bg-secondary);
}

[data-theme="light"] .iban-format-card {
    background: var(--bg-secondary);
}

[data-theme="light"] .feature-card,
[data-theme="light"] .step-card,
[data-theme="light"] .faq-item {
    background: white;
}

/* =====================================================
   INPUT SPINNERS REMOVAL
   ===================================================== */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =====================================================
   SCROLLBAR STYLING
   ===================================================== */
.iban-formats__grid::-webkit-scrollbar {
    width: 8px;
}

.iban-formats__grid::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.iban-formats__grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.iban-formats__grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
