/**
 * Custom WC Registration Styles
 * Matches Shopware registration form design
 */

/* Reset & Base */
.cwcr-registration-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

.cwcr-registration-wrap * {
    box-sizing: border-box;
}

/* Error Messages */
.cwcr-errors {
    background-color: #fff5f5;
    border: 1px solid #c9a1a1;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.cwcr-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cwcr-errors li {
    color: #9b2c2c;
    padding: 3px 0;
}

.cwcr-errors li:before {
    content: "• ";
    color: #9b2c2c;
}

/* Logged in message */
.cwcr-logged-in {
    text-align: center;
    padding: 40px 20px;
    background: #f7f7f7;
    border-radius: 4px;
}

.cwcr-logged-in a {
    color: #c9a489;
}

/* Handler Info Section */
.cwcr-handler-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.cwcr-handler-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.cwcr-handler-info > p {
    color: #777;
    margin-bottom: 25px;
}

.cwcr-handler-steps {
    background: #fafafa;
    padding: 20px;
    border-radius: 4px;
}

.cwcr-step {
    margin-bottom: 20px;
}

.cwcr-step:last-child {
    margin-bottom: 0;
}

.cwcr-step h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cwcr-step p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Sections */
.cwcr-section {
    margin-bottom: 30px;
}

.cwcr-section h3 {
    font-size: 17px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e5e5e5 !important;
    color: #333 !important;
}

/* Rows */
.cwcr-row {
    margin-bottom: 15px;
}

.cwcr-row:last-child {
    margin-bottom: 0;
}

.cwcr-row-half {
    display: flex;
    gap: 15px;
}

/* Fields */
.cwcr-field {
    width: 100%;
}

.cwcr-field-full {
    width: 100%;
}

.cwcr-field-salutation {
    max-width: 200px;
}

.cwcr-field-plz {
    flex: 0 0 35%;
    max-width: 35%;
}

.cwcr-field-city {
    flex: 1;
}

.cwcr-field-country {
    max-width: 250px;
}

/* Inputs & Selects */
.cwcr-form input[type="text"],
.cwcr-form input[type="email"],
.cwcr-form input[type="password"],
.cwcr-form input[type="tel"],
.cwcr-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.cwcr-form input[type="text"]:focus,
.cwcr-form input[type="email"]:focus,
.cwcr-form input[type="password"]:focus,
.cwcr-form input[type="tel"]:focus,
.cwcr-form select:focus {
    outline: none;
    border-color: #c9a489;
    box-shadow: 0 0 0 2px rgba(201, 164, 137, 0.15);
}

.cwcr-form input::placeholder {
    color: #999;
}

/* Select arrow */
.cwcr-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* File Input */
.cwcr-file-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.cwcr-file-hint {
    display: block;
    font-weight: normal;
    font-size: 13px;
    color: #888;
    margin-top: 3px;
}

.cwcr-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    background: #fafafa;
    cursor: pointer;
}

.cwcr-form input[type="file"]:hover {
    border-color: #c9a489;
    background: #fff;
}

/* Field Hints */
.cwcr-field-hint {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    max-width: 100%;
    white-space: normal;
}

/* Birthday Fields */
.cwcr-birthday-row {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.cwcr-birthday-label {
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.cwcr-birthday-fields {
    display: flex;
    gap: 10px;
}

.cwcr-field-day {
    flex: 0 0 100px;
}

.cwcr-field-month {
    flex: 0 0 140px;
}

.cwcr-field-year {
    flex: 0 0 100px;
}

.cwcr-birthday-fields select {
    width: 100%;
}

/* Checkbox */
.cwcr-checkbox-row {
    padding: 15px 0;
}

.cwcr-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.cwcr-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #c9a489;
}

.cwcr-checkbox-label span {
    color: #555;
}

/* Privacy Note */
.cwcr-privacy-note {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.cwcr-privacy-note p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.cwcr-privacy-note a {
    color: #c9a489;
    text-decoration: none;
}

.cwcr-privacy-note a:hover {
    text-decoration: underline;
}

/* Submit Button */
.cwcr-submit-btn {
    display: block;
    width: 100% !important;
    padding: 14px 40px;
    background-color: #cba1a6 !important;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.cwcr-submit-btn:hover {
    background-color: #b8909a !important;
}

.cwcr-submit-btn:active {
    transform: translateY(1px);
}

/* Shipping Section Hidden by Default */
#cwcr-shipping-fields {
    display: none;
    animation: slideDown 0.3s ease;
}

#cwcr-shipping-fields.visible {
    display: block;
}

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

/* Responsive */
@media (max-width: 600px) {
    .cwcr-registration-wrap {
        padding: 15px;
    }

    .cwcr-row-half {
        flex-direction: column;
        gap: 15px;
    }

    .cwcr-field-plz,
    .cwcr-field-city {
        flex: none;
        max-width: none;
        width: 100%;
    }

    .cwcr-birthday-fields {
        flex-wrap: wrap;
    }

    .cwcr-field-day,
    .cwcr-field-month,
    .cwcr-field-year {
        flex: 1 1 calc(33% - 10px);
        min-width: 80px;
    }

    .cwcr-field-salutation,
    .cwcr-field-country {
        max-width: none;
    }

    .cwcr-submit-btn {
        width: 100%;
    }
}

/* Field Error State */
.cwcr-field-error {
    border-color: #c9a1a1 !important;
    background-color: #fff5f5 !important;
}

.cwcr-field-error:focus {
    box-shadow: 0 0 0 2px rgba(201, 161, 161, 0.25) !important;
}

/* Disabled Submit Button */
.cwcr-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
