/* AsYouNeed Pricing Calculator — theme-safe with !important overrides */

/* Collapse spacing from page title and excerpt above the calculator */
.page-id-1244 .entry-title,
.page-id-1244 .page-title,
.page-id-1244 h1 {
    margin-bottom: 4px !important;
    padding-bottom: 0 !important;
}
.page-id-1244 .entry-content > p:first-child,
.page-id-1244 .entry-excerpt,
.page-id-1244 .entry-content > .ayn-calc {
    margin-top: 0 !important;
}
.page-id-1244 .entry-excerpt,
.page-id-1244 .entry-summary {
    margin-bottom: 4px !important;
    padding-bottom: 0 !important;
}

.ayn-calc {
    --ayn-teal: #54c6cb;
    --ayn-teal-dark: #45b0b5;
    --ayn-dark: #343d46;
    --ayn-grey: #f5f5f5;
    --ayn-border: #e0e4ec;
    --ayn-text: #555555;
    --ayn-text-light: #777777;
    --ayn-radius: 12px;
    --ayn-shadow: 0 2px 12px rgba(0,0,0,0.08);

    font-family: "Proxima Nova", sans-serif !important;
    color: #555555 !important;
    max-width: 960px !important;
    margin: 0 auto !important;
    padding: 0 20px 40px !important;
    background: transparent !important;
}

.ayn-calc *, .ayn-calc *::before, .ayn-calc *::after {
    box-sizing: border-box !important;
}

/* Steps */
.ayn-calc__step {
    display: none !important;
    animation: aynFadeIn 0.3s ease;
}
.ayn-calc__step--active {
    display: block !important;
}

@keyframes aynFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Headings — force display on h2/h3 the theme hides */
.ayn-calc h2,
.ayn-calc h3,
.ayn-calc .ayn-calc__heading,
.ayn-calc .ayn-calc__tier-name {
    display: block !important;
}
.ayn-calc__heading {
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 0 0 8px !important;
    color: #54c6cb !important;
    font-family: "Proxima Nova", sans-serif !important;
    background: none !important;
}
.ayn-calc__subheading {
    font-size: 16px !important;
    text-align: center !important;
    color: #555555 !important;
    margin: 0 0 32px !important;
    font-family: "Proxima Nova", sans-serif !important;
}

/* Tier Cards */
.ayn-calc__tiers {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

@media (max-width: 768px) {
    .ayn-calc__tiers {
        grid-template-columns: 1fr !important;
    }
}

.ayn-calc__tier {
    position: relative !important;
    background: #ffffff !important;
    border: 2px solid #e0e4ec !important;
    border-radius: 12px !important;
    padding: 32px 24px 28px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    font-family: "Proxima Nova", sans-serif !important;
    font-size: 14px !important;
    color: #555555 !important;
    width: 100% !important;
    float: none !important;
}
.ayn-calc__tier:hover {
    border-color: #54c6cb !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
    transform: translateY(-2px) !important;
}
.ayn-calc__tier--selected {
    border-color: #54c6cb !important;
    background: linear-gradient(135deg, rgba(84,198,203,0.05), rgba(84,198,203,0.12)) !important;
    box-shadow: 0 4px 20px rgba(84,198,203,0.2) !important;
}
.ayn-calc__tier--selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #54c6cb !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.ayn-calc__tier-icon {
    font-size: 36px !important;
    margin-bottom: 12px !important;
    display: block !important;
}
.ayn-calc__tier-name {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: #54c6cb !important;
    font-family: "Proxima Nova", sans-serif !important;
}
.ayn-calc__tier-price {
    font-size: 15px !important;
    color: #777777 !important;
    margin-bottom: 12px !important;
}
.ayn-calc__tier-price strong {
    font-size: 20px !important;
    color: #45b0b5 !important;
}
.ayn-calc__tier-desc {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #777777 !important;
    margin: 0 !important;
}
.ayn-calc__tier-badge {
    position: absolute !important;
    top: -12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #54c6cb !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 16px !important;
    border-radius: 20px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
}

/* Configuration */
.ayn-calc__config {
    max-width: 600px !important;
    margin: 0 auto !important;
}

.ayn-calc__field {
    margin-bottom: 28px !important;
}
.ayn-calc__label {
    display: block !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #343d46 !important;
    font-family: "Proxima Nova", sans-serif !important;
}
.ayn-calc__label-hint {
    font-weight: 400 !important;
    color: #777777 !important;
    font-size: 14px !important;
}
.ayn-calc__field-desc {
    font-size: 13px !important;
    color: #777777 !important;
    margin: 0 0 12px !important;
}
.ayn-calc__field-highlight {
    font-size: 13px !important;
    color: #2a8a8f !important;
    background: rgba(84, 198, 203, 0.1) !important;
    border-left: 3px solid #54c6cb !important;
    padding: 8px 12px !important;
    margin: 0 0 12px !important;
    border-radius: 0 6px 6px 0 !important;
    line-height: 1.5 !important;
}
.ayn-calc__highlight-icon {
    font-weight: 700 !important;
    margin-right: 4px !important;
    color: #54c6cb !important;
}

/* Block buttons (user count) */
.ayn-calc__blocks {
    display: flex !important;
    gap: 10px !important;
}
.ayn-calc__block {
    flex: 1 !important;
    padding: 14px 8px !important;
    border: 2px solid #e0e4ec !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #555555 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: "Proxima Nova", sans-serif !important;
    text-align: center !important;
    width: auto !important;
}
/* Allow inline display:none to work for conditional blocks */
.ayn-calc__block[style*="display: none"],
.ayn-calc__block[style*="display:none"] {
    display: none !important;
}
.ayn-calc__block:hover {
    border-color: #54c6cb !important;
}
.ayn-calc__block--selected {
    border-color: #54c6cb !important;
    background: #54c6cb !important;
    color: #fff !important;
}

/* Counter */
.ayn-calc__counter {
    display: inline-flex !important;
    align-items: center !important;
    border: 2px solid #e0e4ec !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}
.ayn-calc__counter-btn {
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: #f5f5f5 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    font-family: "Proxima Nova", sans-serif !important;
    color: #555555 !important;
    text-align: center !important;
    line-height: 44px !important;
    padding: 0 !important;
}
.ayn-calc__counter-btn:hover {
    background: #54c6cb !important;
    color: #fff !important;
}
.ayn-calc__counter-value {
    width: 56px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #555555 !important;
}

/* Checkboxes (cloud locations) */
.ayn-calc__checkboxes {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}
.ayn-calc__checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 18px !important;
    border: 2px solid #e0e4ec !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    user-select: none !important;
    background: #fff !important;
}
.ayn-calc__checkbox:hover {
    border-color: #54c6cb !important;
}
.ayn-calc__checkbox input {
    display: none !important;
}
.ayn-calc__checkbox-box {
    width: 22px !important;
    height: 22px !important;
    border: 2px solid #e0e4ec !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    transition: all 0.15s ease !important;
    background: #fff !important;
}
.ayn-calc__checkbox input:checked ~ .ayn-calc__checkbox-box {
    background: #54c6cb !important;
    border-color: #54c6cb !important;
}
.ayn-calc__checkbox input:checked ~ .ayn-calc__checkbox-box::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}
.ayn-calc__checkbox input:checked ~ .ayn-calc__checkbox-label {
    font-weight: 600 !important;
}
.ayn-calc__checkbox-label {
    font-size: 15px !important;
    color: #555555 !important;
}

/* Toggle (CE+ add-on) */
.ayn-calc__toggle-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}
.ayn-calc__toggle {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-family: "Proxima Nova", sans-serif !important;
}
.ayn-calc__toggle-track {
    width: 52px !important;
    height: 28px !important;
    background: #ccc !important;
    border-radius: 14px !important;
    position: relative !important;
    transition: background 0.2s !important;
    flex-shrink: 0 !important;
}
.ayn-calc__toggle[aria-pressed="true"] .ayn-calc__toggle-track {
    background: #54c6cb !important;
}
.ayn-calc__toggle-thumb {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 22px !important;
    height: 22px !important;
    background: #fff !important;
    border-radius: 50% !important;
    transition: transform 0.2s !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}
.ayn-calc__toggle[aria-pressed="true"] .ayn-calc__toggle-thumb {
    transform: translateX(24px) !important;
}
.ayn-calc__toggle-label {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #555555 !important;
}
.ayn-calc__toggle-price {
    font-size: 14px !important;
    color: #45b0b5 !important;
    font-weight: 600 !important;
}

/* Estimate box */
.ayn-calc__estimate {
    margin: 32px 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}
.ayn-calc__estimate-inner {
    background: linear-gradient(135deg, #1a1a2e, #2d2d4e) !important;
    color: #fff !important;
    padding: 28px 32px !important;
    border-radius: 12px !important;
}
.ayn-calc__estimate-tier {
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #54c6cb !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
}
.ayn-calc__estimate-breakdown {
    font-size: 14px !important;
    color: rgba(255,255,255,0.7) !important;
    line-height: 1.8 !important;
    margin-bottom: 16px !important;
}
.ayn-calc__estimate-breakdown .ayn-calc__line {
    display: flex !important;
    justify-content: space-between !important;
    color: rgba(255,255,255,0.7) !important;
}
.ayn-calc__estimate-breakdown .ayn-calc__line span {
    color: rgba(255,255,255,0.7) !important;
}
.ayn-calc__estimate-breakdown .ayn-calc__line-divider {
    border-top: 1px solid rgba(255,255,255,0.15) !important;
    margin: 8px 0 !important;
}
.ayn-calc__estimate-total {
    display: flex !important;
    align-items: baseline !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
.ayn-calc__estimate-label {
    font-size: 14px !important;
    color: rgba(255,255,255,0.6) !important;
}
.ayn-calc__estimate-price {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #fff !important;
}
.ayn-calc__estimate-vat {
    font-size: 12px !important;
    color: rgba(255,255,255,0.4) !important;
}

/* Buttons */
.ayn-calc__nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 24px !important;
}
.ayn-calc__btn {
    padding: 14px 28px !important;
    border-radius: 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    border: none !important;
    font-family: "Proxima Nova", sans-serif !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    line-height: 1.4 !important;
}
.ayn-calc__btn--back {
    background: none !important;
    color: #777777 !important;
    padding-left: 0 !important;
}
.ayn-calc__btn--back:hover {
    color: #555555 !important;
}
.ayn-calc__btn--next,
.ayn-calc__btn--submit {
    background: #54c6cb !important;
    color: #fff !important;
}
.ayn-calc__btn--next:hover,
.ayn-calc__btn--submit:hover {
    background: #45b0b5 !important;
    color: #fff !important;
}
.ayn-calc__btn--next:disabled,
.ayn-calc__btn--submit:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}
.ayn-calc__btn--submit {
    min-width: 200px !important;
}

/* Form */
.ayn-calc__form {
    max-width: 600px !important;
    margin: 0 auto !important;
}
.ayn-calc__form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
}
@media (max-width: 520px) {
    .ayn-calc__form-row {
        grid-template-columns: 1fr !important;
    }
}
.ayn-calc__form-field label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    color: #343d46 !important;
    font-family: "Proxima Nova", sans-serif !important;
}
.ayn-calc__form-field input {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 2px solid #e0e4ec !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    transition: border-color 0.15s;
    font-family: "Proxima Nova", sans-serif !important;
    color: #555555 !important;
    background: #fff !important;
    height: auto !important;
}
.ayn-calc__form-field input:focus {
    outline: none !important;
    border-color: #54c6cb !important;
}
.ayn-calc__form-field input::placeholder {
    color: #aaa !important;
}
.ayn-calc__form-actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 24px !important;
}
.ayn-calc__form-disclaimer {
    font-size: 12px !important;
    color: #777777 !important;
    margin-top: 20px !important;
    text-align: center !important;
}
.ayn-calc__recaptcha-branding {
    font-size: 11px !important;
    color: #999999 !important;
    margin-top: 10px !important;
    text-align: center !important;
}
.ayn-calc__recaptcha-branding a {
    color: #999999 !important;
    text-decoration: underline !important;
}

/* Success */
.ayn-calc__success {
    text-align: center !important;
    padding: 60px 20px !important;
}
.ayn-calc__success-icon {
    width: 72px !important;
    height: 72px !important;
    background: #54c6cb !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    margin-bottom: 24px !important;
}

/* Field hints (guidance text below inputs) */
.ayn-calc__field-hint {
    display: block !important;
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
}

/* Validation error messages */
.ayn-calc__field-error {
    display: block !important;
    font-size: 13px !important;
    color: #e74c3c !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
}

/* Error state on inputs */
.ayn-calc__input--error,
input.ayn-calc__input--error,
.ayn-calc__form-field input.ayn-calc__input--error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15) !important;
}

/* Hide hint when error is showing */
.ayn-calc__form-field:has(.ayn-calc__field-error) .ayn-calc__field-hint {
    display: none !important;
}

/* Loading state */
.ayn-calc__btn--loading {
    position: relative !important;
    color: transparent !important;
    pointer-events: none !important;
}
.ayn-calc__btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aynSpin 0.6s linear infinite;
}
@keyframes aynSpin {
    to { transform: rotate(360deg); }
}
