/* Barcode Generator Specific Styles */
.tool-page-shell .barcode-container {
    margin: 0;
}
.barcode-container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

/* Remove margin from last child to eliminate gap before disclaimer */
.tool-page-shell .barcode-container > *:last-child {
    margin-bottom: 0 !important;
}

.barcode-layout {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.input-section {
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
    border: 1px solid rgba(145, 103, 48, 0.2);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #5e4329;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #fffaf2;
    border: 1px solid rgba(145, 103, 48, 0.26);
    border-radius: 8px;
    color: #4a351f;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #ab7c34;
    box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.16);
    transform: translateY(-1px);
}

.form-group input[type="range"] {
    width: 70%;
    height: 8px;
    background: #eadac0;
    border-radius: 4px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    margin-right: 15px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #b98b3b;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #a57832;
    transform: scale(1.1);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #b98b3b;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.form-group span {
    color: #7a5526;
    font-weight: 600;
    min-width: 50px;
    display: inline-block;
}

.output-section {
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
    border: 1px solid rgba(145, 103, 48, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.output-header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(145, 103, 48, 0.2);
}

.output-header h3 {
    color: #5e4329;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.barcode-display {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.no-barcode-message {
    color: #7b6245;
    font-size: 1rem;
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed rgba(145, 103, 48, 0.25);
    border-radius: 12px;
    background: rgba(182, 138, 58, 0.07);
    margin: 20px 0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.no-barcode-message i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

#barcodeCanvas {
    max-width: 100%;
    height: auto;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    display: none;
}

#barcodeCanvas.show {
    display: block;
}

.error-message {
    color: #9a3f2b;
    background: rgba(173, 82, 47, 0.12);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(154, 63, 43, 0.26);
    text-align: center;
    font-weight: 500;
    display: none;
}

.error-message.show {
    display: block;
}

/* Button container matches hero section */
.input-section .btn-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.input-section .btdn {
    padding: 12px 24px;
    font-size: 0.95rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.input-section .btn-primary {
    background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
    color: #fff8ef;
    border: none;
}

.input-section .btn-primary:hover {
    background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
}

.input-section .btn-secondary {
    background: transparent;
    border: 1px solid rgba(145, 103, 48, 0.4);
    color: #7a572c;
}

.input-section .btn-secondary:hover {
    background: rgba(182, 138, 58, 0.12);
    color: #5e4329;
}

.input-section .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.input-section .btn:disabled:hover {
    transform: none !important;
    background: transparent;
    color: #8c7558;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .barcode-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .barcode-container {
        padding: 0;
    }
    
    .input-section,
    .output-section {
        padding: 20px;
    }
    
    .input-section .btn-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-section .btn {
        width: 100%;
    }
    
    .form-group input[type="range"] {
        width: 60%;
    }
    

    
    #barcodeCanvas {
        padding: 15px;
    }
    
}

@media (max-width: 480px) {
    
    .input-section,
    .output-section {
        padding: 15px;
    }
    
    
    .form-group input[type="range"] {
        width: 50%;
    }
    
    #barcodeCanvas {
        padding: 10px;
    }
    
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #b98b3b;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
