/* =====================================================
   Components CSS - Reusable UI Components
   ===================================================== */

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.btn-primary {
    background-color: #3182ce;
    color: white;
    border: 2px solid #3182ce;
}

.btn-primary:hover {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.btn-secondary {
    background-color: #718096;
    color: white;
    border: 2px solid #718096;
}

.btn-secondary:hover {
    background-color: #4a5568;
    border-color: #4a5568;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: #3182ce;
    border: 2px solid #3182ce;
}

.btn-outline:hover {
    background-color: #3182ce;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.2);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

input[type="text"]:invalid,
input[type="email"]:invalid,
input[type="tel"]:invalid,
select:invalid,
textarea:invalid {
    border-color: #e53e3e;
}

input[type="text"]:invalid:focus,
input[type="email"]:invalid:focus,
input[type="tel"]:invalid:focus,
select:invalid:focus,
textarea:invalid:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 3rem;
    appearance: none;
}

/* Checkbox and Radio Styles */
input[type="checkbox"],
input[type="radio"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
    accent-color: #3182ce;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    line-height: 1.5;
}

/* Newsletter Form */
.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.newsletter-form input[type="email"] {
    flex: 1;
}

.newsletter-form .btn {
    flex-shrink: 0;
}

.privacy-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.privacy-notice input[type="checkbox"] {
    margin: 0;
}

.privacy-notice a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    margin: 0;
    color: #1a365d;
}

.card-body {
    color: #4a5568;
}

.card-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Info Boxes */
.info-box {
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-box h4 {
    color: #234e52;
    margin-bottom: 1rem;
}

.info-box p,
.info-box li {
    color: #285e61;
}

.warning-box {
    background: #fef5e7;
    border: 1px solid #f6e05e;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.warning-box h4 {
    color: #744210;
    margin-bottom: 1rem;
}

.warning-box p,
.warning-box li {
    color: #975a16;
}

.error-box {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.error-box h4 {
    color: #742a2a;
    margin-bottom: 1rem;
}

.error-box p,
.error-box li {
    color: #9b2c2c;
}

/* CTA Boxes */
.cta-box {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.cta-box .btn {
    background: white;
    color: #3182ce;
    border: 2px solid white;
}

.cta-box .btn:hover {
    background: transparent;
    color: white;
    border-color: white;
}

/* Modal/Cookie Management */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.modal-header h2 {
    margin: 0;
    color: #1a365d;
}

.close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #718096;
    line-height: 1;
    padding: 0;
}

.close:hover {
    color: #2d3748;
}

.modal-body {
    padding: 0 2rem;
}

.modal-footer {
    padding: 2rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
    text-align: center;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    color: #4a5568;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Cookie Categories in Modal */
.cookie-category {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-info {
    flex: 1;
}

.cookie-info h3 {
    margin-bottom: 0.5rem;
    color: #1a365d;
}

.cookie-info p {
    margin: 0;
    color: #4a5568;
    font-size: 0.875rem;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3182ce;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Article Components */
.case-study {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.case-study h4 {
    color: #276749;
    margin-bottom: 1rem;
}

.case-study p,
.case-study li {
    color: #2f855a;
}

.step-box {
    background: #edf2f7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.step-box h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.template-box {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.example-box {
    background: #fef5e7;
    border: 1px solid #f6e05e;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.calculation-box {
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.calculation-box h4 {
    color: #234e52;
    margin-bottom: 1rem;
}

/* Process Flow */
.process-flow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    overflow-x: auto;
    padding: 1rem 0;
}

.process-step {
    text-align: center;
    min-width: 150px;
    flex-shrink: 0;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #3182ce;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.process-step h5 {
    color: #1a365d;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.process-step p {
    font-size: 0.875rem;
    color: #4a5568;
    margin: 0;
}

.process-arrow {
    color: #718096;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Document List */
.document-list {
    margin: 2rem 0;
}

.document-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
}

.document-icon {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.document-details h4 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.document-details p {
    color: #4a5568;
    margin: 0;
    font-size: 0.875rem;
}

/* Cost Overview */
.cost-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.cost-item {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.cost-item h4 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.cost-item p {
    color: #3182ce;
    font-weight: bold;
    font-size: 1.25rem;
    margin: 0;
}

/* Comparison Tables */
.change-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.change-before {
    background: #fed7d7;
    padding: 1.5rem;
    border-radius: 8px;
}

.change-after {
    background: #c6f6d5;
    padding: 1.5rem;
    border-radius: 8px;
}

.change-before h5 {
    color: #742a2a;
    margin-bottom: 1rem;
}

.change-after h5 {
    color: #276749;
    margin-bottom: 1rem;
}

.change-before li {
    color: #9b2c2c;
}

.change-after li {
    color: #2f855a;
}

.change-box {
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.change-box.positive {
    background: #c6f6d5;
    border: 1px solid #9ae6b4;
}

.change-box.positive h4,
.change-box.positive h5 {
    color: #276749;
}

.change-box.positive li {
    color: #2f855a;
}

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

.country-group {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.country-group h4 {
    color: #1a365d;
    margin-bottom: 1rem;
    text-align: center;
}

.country-group ul {
    list-style: none;
    padding: 0;
}

.country-group li {
    color: #4a5568;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.country-group li:last-child {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .process-flow {
        flex-direction: column;
    }
    
    .process-arrow {
        transform: rotate(90deg);
    }
    
    .change-comparison {
        grid-template-columns: 1fr;
    }
    
    .cost-overview {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
    }
}
