/**
 * WS Billy Calculator Styles
 * Design inspired by bj-reisemobilwelt.de
 */

:root {
    --ws-billy-primary: #1F356A;
    --ws-billy-accent: #0A74BA;
    --ws-billy-success: #129B67;
    --ws-billy-error: #C85C5E;
    --ws-billy-text: #282829;
    --ws-billy-text-light: #6B6B6B;
    --ws-billy-bg-light: #F9F9F9;
    --ws-billy-border: #E5E5E5;
    --ws-billy-shadow: rgba(31, 53, 106, 0.1);
}

/* Main Wrapper */
.ws-billy-calculator-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

.ws-billy-title {
    font-family: 'Nunito', 'Roboto', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--ws-billy-primary);
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.3;
}

/* Calculator Container */
.ws-billy-calculator {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0px 15px 50px var(--ws-billy-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ws-billy-calculator:hover {
    transform: translateY(-5px);
    box-shadow: 0px 20px 60px rgba(31, 53, 106, 0.15);
}

/* Info Box */
.ws-billy-info-box {
    background: linear-gradient(135deg, #E9ECFB 0%, #D5EEFF 100%);
    border-left: 4px solid var(--ws-billy-accent);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ws-billy-info-icon {
    font-size: 24px;
    color: var(--ws-billy-accent);
    flex-shrink: 0;
}

.ws-billy-info-box p {
    margin: 0;
    font-size: 14px;
    color: var(--ws-billy-text);
    line-height: 1.6;
}

/* Form Grid */
.ws-billy-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Form Group */
.ws-billy-form-group {
    display: flex;
    flex-direction: column;
}

.ws-billy-form-group label {
    font-family: 'Nunito', 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ws-billy-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ws-billy-label-text {
    flex: 1;
}

.ws-billy-label-unit {
    font-weight: 400;
    color: var(--ws-billy-text-light);
    font-size: 13px;
}

/* Input Fields */
.ws-billy-input {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    padding: 14px 16px;
    border: 2px solid var(--ws-billy-border);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--ws-billy-text);
    transition: all 0.3s ease;
    outline: none;
}

.ws-billy-input::placeholder {
    color: #BBBBBB;
    font-size: 14px;
}

.ws-billy-input:hover {
    border-color: var(--ws-billy-accent);
}

.ws-billy-input:focus {
    border-color: var(--ws-billy-accent);
    box-shadow: 0 0 0 3px rgba(10, 116, 186, 0.1);
    background: #FAFCFF;
}

.ws-billy-input.has-value {
    border-color: var(--ws-billy-success);
    background: #F7FBF9;
}

/* Submit Button */
.ws-billy-button {
    width: 100%;
    font-family: 'Nunito', 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--ws-billy-accent) 0%, #0856A0 100%);
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(10, 116, 186, 0.3);
}

.ws-billy-button-icon {
    font-size: 20px;
}

.ws-billy-button:hover {
    background: linear-gradient(135deg, #0856A0 0%, var(--ws-billy-accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 116, 186, 0.4);
}

.ws-billy-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(10, 116, 186, 0.3);
}

/* Result Box */
.ws-billy-result {
    margin-top: 30px;
    padding: 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.ws-billy-result.show {
    opacity: 1;
    transform: translateY(0);
}

.ws-billy-result.success {
    background: linear-gradient(135deg, #E6F4EE 0%, #D1F0E1 100%);
    border-left: 4px solid var(--ws-billy-success);
    color: var(--ws-billy-text);
    padding: 20px 24px;
}

.ws-billy-result.error {
    background: linear-gradient(135deg, #FFE8E8 0%, #FFD6D6 100%);
    border-left: 4px solid var(--ws-billy-error);
    color: var(--ws-billy-text);
    padding: 20px 24px;
}

.ws-billy-result-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ws-billy-result-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.ws-billy-result.success .ws-billy-result-icon {
    color: var(--ws-billy-success);
}

.ws-billy-result.error .ws-billy-result-icon {
    color: var(--ws-billy-error);
}

.ws-billy-result-text {
    flex: 1;
    line-height: 1.6;
}

.ws-billy-result-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ws-billy-primary);
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ws-billy-calculator {
        padding: 30px 20px;
    }

    .ws-billy-title {
        font-size: 26px;
    }

    .ws-billy-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ws-billy-button {
        font-size: 16px;
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .ws-billy-calculator {
        padding: 20px 15px;
        border-radius: 8px;
    }

    .ws-billy-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .ws-billy-info-box {
        padding: 12px 15px;
        font-size: 13px;
    }

    .ws-billy-result-value {
        font-size: 20px;
    }
}

/* Loading State */
.ws-billy-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.ws-billy-button.loading .ws-billy-button-icon {
    animation: ws-billy-spin 1s linear infinite;
}

@keyframes ws-billy-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
