/**
 * WP Inkiess Member - Public Frontend Styles
 */

/* ========================================
   Registrierungsformular
   ======================================== */

.inkiess-registration-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.inkiess-registration-form-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.inkiess-registration-form-container h2 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 28px;
    color: #1d2327;
    text-align: center;
}

/* Form Styles */
.inkiess-form .form-group {
    margin-bottom: 20px;
}

.inkiess-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.inkiess-form .required {
    color: #d63638;
}

.inkiess-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.inkiess-form .form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.inkiess-form select.form-control {
    background: #fff;
    cursor: pointer;
}

.inkiess-form .form-checkbox {
    margin: 25px 0;
}

.inkiess-form .form-checkbox label {
    display: flex;
    align-items: flex-start;
    font-weight: 400;
    cursor: pointer;
}

.inkiess-form .form-checkbox input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.inkiess-form .form-checkbox a {
    color: #2271b1;
    text-decoration: none;
}

.inkiess-form .form-checkbox a:hover {
    text-decoration: underline;
}

.inkiess-form .form-note {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #646970;
}

/* Button Styles */
.inkiess-form .btn {
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.inkiess-form .btn-primary {
    background: #2271b1;
    color: #fff;
}

.inkiess-form .btn-primary:hover {
    background: #135e96;
}

.inkiess-form .btn-primary:disabled {
    background: #c3c4c7;
    cursor: not-allowed;
}

.inkiess-form .btn-block {
    width: 100%;
    display: block;
}

/* Messages */
#inkiess-registration-messages {
    margin-bottom: 20px;
}

#inkiess-registration-messages .message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

#inkiess-registration-messages .message-success {
    background: #d7f2de;
    color: #00a32a;
    border: 1px solid #00a32a;
}

#inkiess-registration-messages .message-error {
    background: #fcf0f1;
    color: #d63638;
    border: 1px solid #d63638;
}

#inkiess-registration-messages .message-error ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

/* ========================================
   Code-Anfrage-Formular (gleiche Styles wie Registrierung)
   ======================================== */

#inkiess-code-request-messages .message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

#inkiess-code-request-messages .message-error {
    background: #fcf0f1;
    color: #d63638;
    border: 1px solid #d63638;
}

#inkiess-code-request-messages .message-error ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

#inkiess-code-result .message-success {
    background: #d7f2de;
    color: #00a32a;
    border: 1px solid #00a32a;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 0;
}

/* ========================================
   Fortschrittsbalken (Code-Anfrage-Formular)
   ======================================== */

.inkiess-progress-wrap {
    margin-bottom: 24px;
}

.inkiess-progress-bar {
    background: #e0e0e0;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
}

.inkiess-progress-fill {
    background: #2271b1;
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
    min-width: 0;
}

.inkiess-progress-percent {
    display: block;
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #646970;
    text-align: right;
}

/* ========================================
   Benutzer-Dashboard
   ======================================== */

.inkiess-dashboard-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.inkiess-dashboard-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f1;
}

.dashboard-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #1d2327;
}

.dashboard-header p {
    margin: 0;
    color: #646970;
    font-size: 16px;
}

.dashboard-content {
    display: grid;
    gap: 30px;
}

/* Dashboard Sections */
.dashboard-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #1d2327;
}

/* Info Table */
.dashboard-info-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-info-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.dashboard-info-table tr:last-child {
    border-bottom: none;
}

.dashboard-info-table th,
.dashboard-info-table td {
    padding: 12px 0;
    text-align: left;
}

.dashboard-info-table th {
    font-weight: 600;
    color: #50575e;
    width: 180px;
}

.dashboard-info-table td {
    color: #1d2327;
}

/* Code Display */
.code-display {
    margin-top: 15px;
}

.code-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 2px solid #2271b1;
    margin-bottom: 15px;
}

.code-box.appstore-code {
    border-color: #00a32a;
}

.code-value {
    flex: 1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 24px;
    font-weight: 700;
    color: #1d2327;
    letter-spacing: 2px;
}

.copy-button {
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.copy-button:hover {
    background: #135e96;
}

.copy-button:active {
    transform: scale(0.98);
}

.code-description {
    margin: 0;
    font-size: 14px;
    color: #646970;
}

/* Steps */
.dashboard-steps {
    margin: 0;
    padding-left: 25px;
    line-height: 1.8;
}

.dashboard-steps li {
    margin-bottom: 10px;
    color: #1d2327;
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-warning {
    background: #fff8e5;
    color: #946200;
    border: 1px solid #dba617;
}

/* Actions */
.dashboard-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.btn-secondary {
    padding: 12px 30px;
    background: #646970;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #50575e;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1d2327;
    color: #fff;
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

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

/* ========================================
   Responsive Design
   ======================================== */

@media screen and (max-width: 768px) {
    .inkiess-registration-form-container,
    .inkiess-dashboard-container {
        padding: 30px 20px;
    }

    .dashboard-header h2 {
        font-size: 24px;
    }

    .code-value {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .code-box {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-button {
        width: 100%;
    }

    .dashboard-info-table th {
        width: 120px;
        font-size: 14px;
    }

    .copy-notification {
        right: 20px;
        left: 20px;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .inkiess-registration-wrapper,
    .inkiess-dashboard-wrapper {
        padding: 0 15px;
    }

    .inkiess-registration-form-container h2 {
        font-size: 24px;
    }

    .inkiess-form .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .code-value {
        font-size: 16px;
    }
}
