/**
 * K Custom Payments - Stripe-like Credit Card Checkout & Admin Field Builder Styles
 */

/* ==========================================================================
   Front-End Stripe-Style Card Element
   ========================================================================== */

.k-cc-container {
    background: #ffffff;
    border: 1px solid #e6e8eb;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1f36;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.k-cc-container * {
    box-sizing: border-box;
}

.k-cc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.k-cc-field-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.k-cc-field-wrap.k-cc-half {
    width: calc(50% - 8px);
}

@media (max-width: 540px) {
    .k-cc-field-wrap.k-cc-half {
        width: 100%;
    }
}

.k-cc-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.1px;
    color: #404f5e;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.k-cc-label .required {
    color: #df1b41;
    margin-left: 3px;
}

.k-cc-input-relative {
    position: relative;
    display: flex;
    align-items: center;
}

.k-cc-input {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1f36;
    background-color: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    outline: none;
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(18, 42, 66, 0.02);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.k-cc-input-relative .k-cc-input {
    padding-right: 48px;
}

.k-cc-input:focus {
    background-color: #ffffff;
    border-color: #0a2540;
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.12);
}

.k-cc-input.k-cc-invalid {
    border-color: #df1b41 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(223, 27, 65, 0.12) !important;
}

.k-cc-input.k-cc-valid {
    border-color: #10b981;
}

.k-cc-pay-btn:hover {
    background-color: #1a1f36 !important;
    box-shadow: 0 6px 16px rgba(10, 37, 64, 0.25) !important;
    transform: translateY(-1px);
}

.k-cc-pay-btn:focus,
.k-cc-pay-btn:active {
    background-color: #051626 !important;
    outline: none !important;
    transform: translateY(0);
}

/* Card Brand Icon Inside Input */
.k-cc-brand-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 36px;
    pointer-events: none;
}

.k-cc-brand-badge svg,
.k-cc-brand-badge img {
    max-height: 24px;
    max-width: 36px;
    object-fit: contain;
}

/* Checkbox Style */
.k-cc-checkbox-wrap {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.k-cc-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #635bff;
    cursor: pointer;
}

.k-cc-checkbox-wrap label {
    font-size: 14px;
    cursor: pointer;
    color: #2d3748;
    margin-bottom: 0;
}

/* Live Error / Hint Text */
.k-cc-field-hint {
    font-size: 11px;
    color: #718096;
    margin-top: 4px;
}

.k-cc-error-text {
    font-size: 11px;
    color: #e53e3e;
    margin-top: 4px;
    display: none;
}

.k-cc-field-wrap.has-error .k-cc-error-text {
    display: block;
}

/* ==========================================================================
   Admin Dynamic Field Builder Styles
   ========================================================================== */

.k-cc-admin-builder {
    background: #ffffff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    max-width: 950px;
}

.k-cc-admin-builder-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d2327;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.k-cc-field-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.k-cc-field-table th {
    background: #f6f7f7;
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #50575e;
    border-bottom: 2px solid #dcdcde;
}

.k-cc-field-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}

.k-cc-field-table input[type="text"],
.k-cc-field-table select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 13px;
}

.k-cc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: 1px solid transparent;
}

.k-cc-btn-primary {
    background: #2271b1;
    color: #ffffff;
    border-color: #2271b1;
}

.k-cc-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.k-cc-btn-danger {
    background: #fcf0f1;
    color: #d63638;
    border-color: #d63638;
}

.k-cc-btn-danger:hover {
    background: #d63638;
    color: #ffffff;
}

.k-cc-drag-handle {
    cursor: move;
    color: #a7aaad;
    font-size: 16px;
}
