/*
 * Orders Page Specific Styles
 * Import main-new.css first, then this file
 * 
 * Usage:
 * @import url('main-new.css');
 * @import url('orders.css');
 *
 * NOTE: Header and mobile menu styles are inherited from main-new.css
 * (_header.css and _mobile-menu.css) - DO NOT override them here
 */

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
    min-height: 100vh;
    padding: 20px;
    background: var(--surface);
}

/* ===== MAIN TITLE (standalone form) ===== */
.main-title {
    text-align: center;
    margin-bottom: 32px;
}

.main-title .subtitle {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.main-title h1 {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.main-title .divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

.main-title .divider-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.main-title .divider-diamond {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    transform: rotate(45deg);
    border-radius: 1px;
}

/* ===== STANDALONE HEADER (for embedded forms, NOT main site header) ===== */
.header.standalone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm), 0 8px 24px rgba(26, 39, 68, 0.04);
    flex-wrap: wrap;
    gap: 12px;
    overflow: hidden;
}

.header.standalone::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(196, 114, 43, 0.15) 0%, rgba(91, 140, 184, 0.1) 50%, rgba(196, 114, 43, 0.15) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

.header.standalone .logo-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header.standalone .logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 19px;
    box-shadow: 0 4px 12px var(--glow), inset 0 -2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.header.standalone .logo-text h1 {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin: 0;
}

.header.standalone .logo-text p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.header-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: 7px 16px;
    border-radius: 18px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 8px rgba(61, 90, 128, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* ===== PRODUCT ITEMS ===== */
.product-item {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px 16px 16px;
    margin-bottom: 16px;
    margin-top: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.product-item:hover {
    border-color: rgba(196, 114, 43, 0.2);
}

.product-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.product-item-number {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.product-remove-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: var(--white);
}

/* ===== PRODUCT NUMBER BADGE ===== */
.product-number {
    position: absolute;
    top: -8px;
    left: 16px;
    background: var(--gradient-secondary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    box-shadow: 0 2px 6px var(--glow), inset 0 1px 2px rgba(255, 255, 255, .25);
    letter-spacing: .3px;
}

/* ===== BTN-REMOVE ===== */
.btn-remove {
    background: linear-gradient(135deg, #ffffff 0%, #fef5f5 100%);
    color: #dc3545;
    border: 1.5px solid rgba(220, 53, 69, .2);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(220, 53, 69, .08);
}

.btn-remove:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-color: #dc3545;
    box-shadow: 0 3px 10px rgba(220, 53, 69, .25), inset 0 1px 2px rgba(255, 255, 255, .2);
    transform: translateY(-1px);
}

/* ===== BTN-ADD ===== */
.btn-add {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(61, 90, 128, .25), inset 0 1px 2px rgba(255, 255, 255, .15);
    letter-spacing: .3px;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(61, 90, 128, .35), inset 0 1px 2px rgba(255, 255, 255, .2);
}

.btn-add:active {
    transform: translateY(0);
}

/* ===== ADD PRODUCT BUTTON ===== */
.add-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: rgba(196, 114, 43, 0.04);
    border: 2px dashed rgba(196, 114, 43, 0.25);
    border-radius: var(--radius-md);
    color: var(--secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.add-product-btn:hover {
    background: rgba(196, 114, 43, 0.08);
    border-color: var(--secondary);
}

/* ===== DELIVERY ROW ===== */
.delivery-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.delivery-row .field {
    flex: 1;
}

.delivery-row .field.delivery-service-field {
    flex: 0 0 auto;
    width: 200px;
}

/* ===== IBAN FIELD ===== */
.iban-container {
    position: relative;
    max-width: 320px;
}

.iban-input {
    padding-left: 44px !important;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace !important;
    font-size: 13px !important;
    letter-spacing: 0.5px;
}

.iban-flag {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 20px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.iban-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iban-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.iban-status.visible {
    opacity: 1;
}

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

.iban-status.invalid {
    color: #ef4444;
}

/* ===== ORDERS RESPONSIVE ===== */
@media (min-width: 1000px) {
    .product-item .fields-row {
        grid-template-columns: 2fr auto 80px 1fr 80px auto;
    }
}

@media (min-width: 700px) and (max-width: 999px) {
    .product-item .fields-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (min-width: 500px) and (max-width: 699px) {
    .product-item .fields-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .delivery-row {
        flex-direction: column;
    }

    .delivery-row .field {
        max-width: 100%;
    }

    .delivery-row .field.delivery-service-field {
        width: 100%;
    }

    .delivery-row .field.delivery-service-field select {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .page-wrapper {
        padding: 12px 10px;
    }

    /* Standalone header responsive - NOT main site header */
    .header.standalone {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .main-title h1 {
        font-size: 18px;
        letter-spacing: 0.5px;
    }

    .main-title .subtitle {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .main-title .divider {
        gap: 12px;
        margin-top: 14px;
    }

    .main-title .divider-line {
        width: 30px;
    }

    .main-title .divider-diamond {
        width: 6px;
        height: 6px;
    }

    .field select {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 499px) {
    .product-item .fields-row {
        grid-template-columns: 1fr;
    }

    .field.application-field select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .iban-container {
        max-width: 100%;
    }

    .iban-flag {
        width: 24px;
        height: 17px;
        left: 8px;
    }

    .iban-input {
        padding-left: 40px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 400px) {
    /* Standalone header responsive - NOT main site header */
    .header.standalone .logo-text h1 {
        font-size: 17px;
    }

    .header-badge {
        font-size: 9px;
        padding: 6px 12px;
    }

    .main-title h1 {
        font-size: 16px;
    }

    .main-title .subtitle {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .main-title .divider-line {
        width: 24px;
    }
}