/* HWB Equipment Hire - Frontend Styles */

.hwb-hire-form-container,
.hwb-return-form-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hwb-form {
    width: 100%;
}

.hwb-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.hwb-form-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.hwb-form-row {
    margin-bottom: 20px;
}

.hwb-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.hwb-form-row input[type="text"],
.hwb-form-row input[type="email"],
.hwb-form-row input[type="tel"],
.hwb-form-row input[type="date"],
.hwb-form-row input[type="number"],
.hwb-form-row select,
.hwb-form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.hwb-form-row input:focus,
.hwb-form-row select:focus,
.hwb-form-row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.hwb-form-row-split {
    display: flex;
    gap: 15px;
}

.hwb-form-col {
    flex: 1;
}

.hwb-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.hwb-photo-upload {
    text-align: center;
}

.hwb-photo-upload label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.hwb-photo-upload input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.hwb-photo-preview {
    margin-top: 10px;
    min-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.hwb-photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.hwb-signature-pad-container {
    margin-top: 10px;
}

#signature-pad {
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    height: 150px;
    background: #fff;
}

.hwb-btn-secondary {
    margin-top: 10px;
    padding: 8px 15px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.hwb-btn-secondary:hover {
    background: #555;
}

.hwb-form-actions {
    margin-top: 30px;
    text-align: center;
}

.hwb-btn-primary {
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.hwb-btn-primary:hover {
    background: #005177;
}

.hwb-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.hwb-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.hwb-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hwb-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hwb-help-text {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
}

.hwb-info-text {
    background: #e7f3f8;
    padding: 10px;
    border-radius: 4px;
    color: #0073aa;
}

.hwb-hire-summary {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.hwb-hire-summary p {
    margin: 8px 0;
}

.hwb-overdue-warning {
    background: #fff3cd;
    border-left-color: #ffc107 !important;
    color: #856404;
}

.hwb-my-hires-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.hwb-my-hires-table th,
.hwb-my-hires-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.hwb-my-hires-table th {
    background: #0073aa;
    color: white;
    font-weight: 600;
}

.hwb-my-hires-table tr:hover {
    background: #f9f9f9;
}

/* Loading spinner */
.hwb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: hwb-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes hwb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .hwb-hire-form-container,
    .hwb-return-form-container {
        padding: 15px;
    }
    
    .hwb-form-row-split {
        flex-direction: column;
    }
    
    .hwb-photo-grid {
        grid-template-columns: 1fr;
    }
}
