/* Ark Mollie Payments - Frontend Styles */

.amp-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

.amp-container {
    width: 100%;
}

.amp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.amp-col-main {
    flex: 1;
    min-width: 0;
}

.amp-col-side {
    width: 320px;
    flex-shrink: 0;
}

.amp-shadow-column {
    background: #fff;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(99, 99, 99, 0.2);
    border-radius: 8px;
}

/* =============================================
   TWO-COLUMN SECTION LAYOUT (label left, fields right)
   ============================================= */
.amp-section {
    margin-bottom: 24px;
}

.amp-section-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.amp-section-label {
    width: 200px;
    flex-shrink: 0;
    padding-top: 14px;
}

.amp-section-label h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.3;
}

.amp-section-fields {
    flex: 1;
    min-width: 0;
}

/* Input grid inside section-fields */
.amp-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.amp-col-half {
    width: calc(50% - 5px);
    box-sizing: border-box;
}

/* =============================================
   RADIO / CHECKBOX FORM BOXES
   ============================================= */
.amp-form-box-radio input[type="radio"],
.amp-form-box input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.amp-form-box-radio label {
    display: flex;
    align-items: center;
    width: 100%;
    border: 2px solid #ddd;
    padding: 16px 55px 16px 20px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.amp-form-box-radio label:hover {
    border-color: #bbb;
}

.amp-form-box-radio input:checked + label {
    border-color: #027e8d;
    background: #f8fffe;
}

.amp-form-box-radio label::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ddd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E") center / 0 0 no-repeat;
    transition: all 0.2s ease;
}

.amp-form-box-radio input:checked + label::after {
    background-color: #027e8d;
    background-size: 14px 14px;
}

.amp-form-box-radio label span {
    font-size: 14px;
    color: #333;
    padding-left: 2px;
}

.amp-form-box-radio label img {
    width: 36px;
    height: auto;
    margin-right: 12px;
    border-radius: 4px;
}

/* =============================================
   FORM CONTROLS (inputs)
   ============================================= */
.amp-form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.amp-form-control:focus {
    border-color: #027e8d;
    outline: none;
}

/* =============================================
   PHONE INPUT WITH COUNTRY CODE
   ============================================= */
.amp-phone-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.amp-country-select-wrapper {
    flex-shrink: 0;
}

.amp-country-select {
    height: 100%;
    padding: 10px 8px;
    border: 2px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    background: #f9fafb;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 22px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
    min-width: 95px;
}

.amp-country-select:focus {
    border-color: #027e8d;
    outline: none;
}

.amp-phone-wrapper .amp-phone-input {
    border-radius: 0 6px 6px 0;
    flex: 1;
    min-width: 0;
}

.amp-phone-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    padding-left: 2px;
}

.amp-phone-input.amp-input-invalid {
    border-color: #ef4444;
}

.amp-phone-input.amp-input-valid {
    border-color: #22c55e;
}

/* =============================================
   PAYMENT METHODS
   ============================================= */
.amp-methods-loading {
    padding: 15px;
    text-align: center;
    color: #888;
}

.amp-methods-container select {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* =============================================
   SUBMIT BUTTON
   ============================================= */
.amp-btn-cta {
    display: inline-block;
    border: none;
    background: #027e8d;
    border-radius: 6px;
    color: #fff;
    padding: 14px 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    box-sizing: border-box;
    text-decoration: none;
}

.amp-section-fields .amp-btn-cta {
    width: 100%;
}

.amp-btn-cta:hover {
    opacity: 0.9;
}

.amp-btn-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.amp-terms-text {
    font-size: 13px;
    color: #666;
    margin: 15px 0 10px;
}

.amp-terms-text a {
    color: #027e8d;
}

/* =============================================
   SIDEBAR WIDGET
   ============================================= */
.amp-widget {
    background: #fff;
    box-shadow: 0 2px 8px rgba(99, 99, 99, 0.2);
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

.amp-widget h2 {
    font-size: 18px;
    margin: 0 0 12px;
}

.amp-product-title {
    background: #027e8d;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.amp-widget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.amp-product-price {
    font-weight: 700;
    font-size: 24px;
    color: #333;
}

.amp-btn-widget {
    margin-top: 15px;
    width: 100%;
}

.amp-discount-badge,
.amp-discount-display .amp-discount-badge {
    background: #027e8d;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* =============================================
   FORM MESSAGES
   ============================================= */
.amp-form-message {
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.amp-form-message.amp-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.amp-form-message.amp-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Loading spinner */
.amp-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: amp-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes amp-spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   RETURN / THANK YOU PAGE
   ============================================= */
.amp-return-page {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.amp-return-container {
    max-width: 500px;
    text-align: center;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.amp-return-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.amp-return-success .amp-return-icon { color: #22c55e; }
.amp-return-pending .amp-return-icon { color: #f59e0b; }
.amp-return-failed .amp-return-icon { color: #ef4444; }

.amp-return-container h2 {
    margin: 0 0 10px;
}

.amp-return-container p {
    color: #666;
}

.amp-return-id code {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.amp-return-container .amp-btn-cta {
    display: inline-block;
    width: auto;
    margin-top: 20px;
}

.amp-error {
    color: #dc2626;
    padding: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .amp-row {
        flex-direction: column;
    }

    .amp-col-side {
        width: 100%;
    }

    .amp-section-row {
        flex-direction: column;
        gap: 8px;
    }

    .amp-section-label {
        width: 100%;
        padding-top: 0;
    }

    .amp-col-half {
        width: 100%;
    }

    .amp-shadow-column {
        padding: 15px;
    }
}
