/* Modern Card-Style Container */
.kd-cf-container {
    max-width: 650px;
    margin: 40px auto;
    font-family: 'Inter', 'Segoe UI', Helvetica, sans-serif;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    box-sizing: border-box;
}

/* Progress Bar */
.kd-cf-progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    height: 6px;
    margin-bottom: 30px;
    border-radius: 3px;
    overflow: hidden;
}

.kd-cf-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #3b82f6);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 3px;
}

/* Step Styling */
.kd-cf-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kd-cf-step.active {
    display: block;
    /* Normal block flow, not flex center */
    opacity: 1;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
.kd-cf-step h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #1f2937;
    font-weight: 600;
}

.kd-cf-step label {
    font-size: 16px;
    margin-bottom: 10px;
    color: #374151;
    display: block;
    font-weight: 500;
}

/* Inputs - Standard Box Style */
.kd-cf-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #111;
}

.kd-cf-input:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.kd-cf-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Radio Groups */
.kd-cf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kd-radio-option label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
    background: #f9fafb;
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
    margin-bottom: 0;
}

.kd-radio-label-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Allow text to take up remaining space */
}

.kd-radio-option label:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.kd-radio-option input[type="radio"] {
    margin: 0;
    accent-color: #4f46e5;
    width: 18px;
    height: 18px;
}

/* Buttons */
.kd-cf-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    /* Right align buttons */
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.kd-cf-btn {
    padding: 10px 24px;
    font-size: 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.kd-cf-next,
.kd-cf-submit {
    background-color: #4f46e5;
    /* Indigo */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.kd-cf-next:hover,
.kd-cf-submit:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
}

.kd-cf-prev {
    background-color: #fff;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.kd-cf-prev:hover {
    background-color: #f9fafb;
    color: #111;
    border-color: #9ca3af;
}

/* Info Content */
.kd-cf-content {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 25px;
    line-height: 1.6;
}

.kd-cf-content p {
    margin-bottom: 12px;
}

/* Shake Animation for Errors */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.kd-cf-step.shake {
    animation: shake 0.4s ease-in-out;
}
/* Phone Wrapper */
.kd-phone-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.kd-phone-code {
    flex: 0 0 110px;
}

.kd-phone-wrapper input[type='tel'] {
    flex: 1;
}


/* Custom Phone Select Styling */
.kd-custom-select {
    position: relative;
    flex: 0 0 140px;
    font-size: 14px;
    user-select: none;
    -webkit-user-select: none;
}

.kd-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
    box-sizing: border-box;
}

.kd-select-trigger:hover {
    background: #fff;
    border-color: #9ca3af;
}

.kd-select-trigger span.kd-code {
    font-weight: 500;
    margin-left: 6px;
}

.kd-select-dropdown {
    position: absolute;
    top: 105%;
    left: 0;
    width: 280px; /* Wider than trigger to show full country names */
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.kd-custom-select.open .kd-select-dropdown {
    display: flex;
    animation: fadeInSelect 0.2s ease-out;
}

@keyframes fadeInSelect {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.kd-search-container {
    padding: 8px;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

.kd-select-search {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
}

.kd-select-search:focus {
    border-color: #4f46e5;
}

.kd-options-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}

.kd-options-list li {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.1s;
}

.kd-options-list li:last-child {
    border-bottom: none;
}

.kd-options-list li:hover,
.kd-options-list li.highlight {
    background-color: #f3f4f6;
}

.kd-options-list li.selected {
    background-color: #e0e7ff;
    font-weight: 600;
}

.kd-options-list li .flag {
    font-size: 1.2em;
}

.kd-options-list li .country-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    color: #374151;
}

.kd-options-list li .dial-code {
    color: #6b7280;
    font-size: 0.9em;
}

